<?php
/**
 * @version		$Id$
 * @package		ALM Hoster
 * @desription	Web hosting and domain menager for resellers
 * @subpackage	Components
 * @copyright	Copyright (C) 2011 ALM Studio. All rights reserved.
 * @author		ALM Studio
 * @email		info@alm-studio.net
 * @link		http://alm-studio.net
 * @license		Commercial
 */
 
defined('_JEXEC') or die('Restricted Access');

JHtml::_('behavior.tooltip');
JHTML::_('script','system/multiselect.js',false,true);
$listOrder	= $this->escape($this->state->get('list.ordering'));
$listDirn	= $this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo JRoute::_('index.php?option=com_almhoster&view=email_tmpls'); ?>" method="post" name="adminForm">
<table class="adminlist">
	<thead>
	<tr>
	<th width="10">
		<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->items); ?>);" />
	</th>
	<th>
		<?php echo JHtml::_('grid.sort',  'COM_ALMHOSTER_EMAIL_TMPL_KEY', 'TmplKey', $listDirn, $listOrder); ?>
	</th>			
	<th>
		<?php echo JHtml::_('grid.sort',  'COM_ALMHOSTER_EMAIL_TMPL_SUBJECT', 'TmplSubjekt', $listDirn, $listOrder); ?>
	</th>
	<th>
		<?php echo JHtml::_('grid.sort',  'COM_ALMHOSTER_EMAIL_TMPL_FROM_NAME', 'TmplFromName', $listDirn, $listOrder); ?>
	</th>
	<th>
		<?php echo JHtml::_('grid.sort',  'COM_ALMHOSTER_EMAIL_TMPL_FROM_EMAIL', 'TmplFromEmail', $listDirn, $listOrder); ?>
	</th>
	</tr>
</thead>
<tfoot>	
	<tr>
	<td colspan="5">
		<?php echo $this->pagination->getListFooter(); ?></td>
	</tr>		
</tfoot>
<tbody>
	<?php foreach($this->items as $i => $item): 
?>
	<tr class="row<?php echo $i % 2; ?>">
		<td>
			<?php echo JHtml::_('grid.id', $i, $item->TmplId); ?>
		</td>
		<td>
			<a href="<?php echo JRoute::_('index.php?option=com_almhoster&task=email_tmpl.edit&TmplId=' . $item->TmplId); ?>">
				<?php echo $item->TmplKey; ?>
			</a>
		</td>
		<td align="left">
				<?php echo $item->TmplSubjekt; ?>
		</td>
		<td align="center">
			<?php echo $item->TmplFromName; ?>
		</td>
		<td align="center">
			<?php echo $item->TmplFromEmail; ?>
		</td>		
	</tr>
<?php endforeach; ?>
</tbody>
	</table>
	<div>
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
		<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>

